package org.cypress.rtpack.VO;

public class SoeLs {
    private Integer unixTime1;
    private Integer unixTime2;
    private String channelName;
    private Integer eventV;
    private float val;

    // 无参构造函数
    public SoeLs() {}

    // 带参数的构造函数
    public SoeLs(Integer unixTime1, Integer unixTime2, String channelName, Integer eventV, float val) {
        this.unixTime1 = unixTime1;
        this.unixTime2 = unixTime2;
        this.channelName = channelName;
        this.eventV = eventV;
        this.val = val;
    }

    // Builder模式
    public static Builder builder() {
        return new Builder();
    }

    public static class Builder {
        private Integer unixTime1;
        private Integer unixTime2;
        private String channelName;
        private Integer eventV;
        private float val;

        public Builder unixTime1(Integer unixTime1) {
            this.unixTime1 = unixTime1;
            return this;
        }

        public Builder unixTime2(Integer unixTime2) {
            this.unixTime2 = unixTime2;
            return this;
        }

        public Builder channelName(String channelName) {
            this.channelName = channelName;
            return this;
        }

        public Builder eventV(Integer eventV) {
            this.eventV = eventV;
            return this;
        }

        public Builder val(float val) {
            this.val = val;
            return this;
        }

        public SoeLs build() {
            return new SoeLs(unixTime1, unixTime2, channelName, eventV, val);
        }
    }

    // Getter和Setter方法（保持不变）
    public Integer getUnixTime1() {
        return unixTime1;
    }

    public void setUnixTime1(Integer unixTime1) {
        this.unixTime1 = unixTime1;
    }

    public Integer getUnixTime2() {
        return unixTime2;
    }

    public void setUnixTime2(Integer unixTime2) {
        this.unixTime2 = unixTime2;
    }

    public String getChannelName() {
        return channelName;
    }

    public void setChannelName(String channelName) {
        this.channelName = channelName;
    }

    public Integer getEventV() {
        return eventV;
    }

    public void setEventV(Integer eventV) {
        this.eventV = eventV;
    }

    public float getVal() {
        return val;
    }

    public void setVal(float val) {
        this.val = val;
    }

    @Override
    public String toString() {
        return "SoeLs{" +
                "unixTime1=" + unixTime1 +
                ", unixTime2=" + unixTime2 +
                ", channelName='" + channelName + '\'' +
                ", eventV=" + eventV +
                ", val=" + val +
                '}';
    }
}